//
//  UserTableViewCell.m
//  project
//
//  Created by lanou on 15/11/3.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "UserTableViewCell.h"

@implementation UserTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _imgView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 15, 30, 30)];
        _imgView.layer.masksToBounds = YES;
        _imgView.layer.cornerRadius = 15;
        [self.contentView addSubview:_imgView];
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(50, 15, 200, 30)];
      //  _titleLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_titleLabel];
    }
    return self;
}


-(void)configModel:(SettingModel *)model
{
    _imgView.backgroundColor = model.color;
    [_imgView setImage:[UIImage imageNamed:model.imgName]];
    
    _titleLabel.text = model.title;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
